<#assign module="chart"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/datepicker/datepicker.css">

</@override>
<@override name="body">
<div class="row">

	<div class="col-xs-13">
		<div class="col-md-2">
			<ul class="list-group">
	        	<#--
	        	<li class="list-group-item"><a  href="${ctx}/chart/heatMap">热力图</a></li>
	        	-->
	        	<@daijia>
		        <li class="list-group-item"><a  href="${ctx}/chart/compositive">代驾订单汇总</a></li>
		        </@daijia>
				<@pao>
				<li class="list-group-item"><a  href="${ctx}/chart/paotuiCompositive">跑腿订单汇总</a></li>
				</@pao>
				<@zhuan>
				<li class="list-group-item"><a  href="${ctx}/chart/zhuanCompositive">专车订单汇总</a></li>
				</@zhuan>
				<@freight>
				<li class="list-group-item"><a  href="${ctx}/chart/freightCompositive">货运订单汇总</a></li>
				</@freight>
				<@zhuanxian>
				<li class="list-group-item"><a  href="${ctx}/chart/zhuanxianCompositive">快车订单汇总</a></li>
				</@zhuanxian>
		        <li class="list-group-item"><a  href="${ctx}/chart/orderYearChart">订单统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/orderType">订单来源统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/memberOrder1">客户消费统计</a></li>
				<li class="list-group-item"><a  href="${ctx}/chart/tableNewMemberMonth">新增客户统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/driverOrder">服务人员业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/introduce">推荐员工业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/infoFee">保险费/信息费</a></li>
			    <@shiro.isMainCompany>
			    <li class="list-group-item"><a  href="${ctx}/chart/companyOrder">公司统计</a></li>
			    </@shiro.isMainCompany>
			    <!-- <li class="list-group-item"><a  href="${ctx}/chart/activity">活动统计</a></li> -->
			    <li class="list-group-item"><a  href="${ctx}/chart/driverTime">服务人员在线时间统计</a></li>
		    </ul>
		</div>
		 
		<div class="col-md-10">
		
			<div role="tabpanel">
				<!-- Nav tabs -->
				<ul class="nav nav-tabs" role="tablist">
				    <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab">列表</a></li>
				    <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab">导出</a></li>
			    </ul>
			    <!-- Tab panes -->
			    <div class="tab-content">
				    <div role="tabpanel" class="tab-pane fade in active" id="tab1">
				    	<div class="row margin-top">
							<div class="col-xs-12">
								<form class="form-inline" id="SearchForm" method="get">
									<@shiro.isMainCompany>
										<select class="form-control" name="companyId" id="companyId">
											<option value="">全部</option>
								  			<#list companys as company>
								  				<option value="${company.id}" <#if companyId?? && companyId==company.id>selected="selected"</#if>>${company.abbreviation}</option>
								  			</#list>
							  			</select>
					  				</@shiro.isMainCompany>
							  		
								  	<div class="form-group">
								  		
								  		<div class="btn-group">
										  <button id="dateRangeButton" type="button" class="btn btn-default dropdown-toggle">
										    <span id="dateRangeText">选择时间</span> <span class="caret"></span>
										  </button>
										  <div class="dropdown-calendar">
										  	<div class="panel panel-default" style="margin-bottom:0px;">
											  <div class="panel-heading">
											  	时间范围 ：<input type="text" id="startTime" name="startTime" /> 至 <input type="text" id="endTime" name="endTime" />
											  	<button type="button" id="applyIt" class="pull-right">应用</button>
											  </div>
											  <div id="dateRangeCalendar"></div>
											</div>
										  </div>
										</div>
							  
								    </div>
								    
								    <div class="form-group">
								        <button type="button" id="search_button" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> 查询</button>
								    </div>
							    </form>
						    </div>
					    </div>
			
						<ul class="pagination pull-left pagination-sm pageshow">
							<li><a>共 ${totalElements!0} 条数据</a></li>
						</ul>
						<ul id="pagination" class="pagination pull-left pagination-sm pagedata">
	   					</ul>
   									  
						<div class="row margin-top">
							<div class="col-xs-12">
								<div class="table-responsive">
									<div class="panel panel-primary">
									  <table class="table table-hover table-striped">
									  	<thead>
									  		<tr style="font-size:14px;">
									  			<th>订单来源</th>
									  			<th>订单数量</th>
									  			<th>金额</th>
									 		</tr>
									  	</thead>
									  	<tbody>
									  		
									  	</tbody>
									  </table>
									  
									  <ul class="pagination pull-left pagination-sm pageshow">
									  	<li><a>共 ${totalElements!0} 条数据</a></li>
									  </ul>
									  <ul class="pagination pull-left pagination-sm pagedata">
									  </ul>
   									  
									</div>
								</div>
							</div>
						</div>
				    </div>
				    <div role="tabpanel" class="tab-pane fade" id="tab2">
				    	<div class="row margin-top">
							<div class="col-xs-12">
								<form id="ExportForm" class="form-horizontal">
								
								  <@shiro.isMainCompany>
									  <div class="form-group">
									    <label for="inputPassword3" class="col-sm-2 control-label">所属公司</label>
									    <div class="col-sm-2">
									      	<select class="form-control" id="exportCompanyId" name="exportCompanyId">
											   	<option value="">全部</option>
											    <#list companys as company>
									  				<option value="${company.id}">${company.abbreviation}</option>
									  			</#list>
											</select>
									    </div>
									  </div>
								  </@shiro.isMainCompany>
								 <div class="form-group">
								    <label class="col-sm-2 control-label">时间</label>
								    <div class="col-sm-2">
								    	<div class="btn-group">
										  <button id="exportDateRangeButton" type="button" class="btn btn-default dropdown-toggle">
										    <span id="exportDateRangeText">选择时间</span> <span class="caret"></span>
										  </button>
										  <div class="dropdown-calendar">
										  	<div class="panel panel-default" style="margin-bottom:0px;">
											  <div class="panel-heading">
											  	时间范围 ：<input type="text" id="exportStartTime" name="exportStartTime" /> 至 <input type="text" id="exportEndTime" name="exportEndTime" />
											  	<button type="button" id="exportClearIt" class="pull-right">清空</button>
											  	<button type="button" id="exportApplyIt" class="pull-right">应用</button>
											  </div>
											  <div id="exportDateRangeCalendar"></div>
											</div>
										  </div>
										</div>
								    </div>
								  </div>
								
								
								  <hr/>
								  
								  
								  <div class="form-group">
								  	<label for="inputPassword3" class="col-sm-2 control-label">导出字段</label>
								    <div class="col-sm-2">
								      <div class="checkbox">
								        <p><label><input name="heards" value="订单来源" type="checkbox" checked="checked"> 订单来源</label></p>
								        <p><label><input name="heards" value="订单数量" type="checkbox" checked="checked"> 订单数量</label></p>
								        <p><label><input name="heards" value="金额" type="checkbox" checked="checked"> 金额</label></p>
								        </div>
								    </div>
								  </div>
								  
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">是否导出表头</label>
								    <div class="col-sm-2">
								      <div class="checkbox">
								        <p><label><input id="tableHeader" name="tableHeader" type="checkbox" checked="checked"> &nbsp;</label></p>
								      </div>
								    </div>
								  </div>
								  
								  <div class="form-group">
								    <label for="exampleInputEmail1" class="col-sm-2 control-label">导出数量</label>
								    <div class="col-sm-2">
									    <div class="checkbox">
									    	<label><input id="allAmount" name="allAmount" type="checkbox" checked="checked"> 全部</label>
									    </div>
									    <p></p>
									    <div class="input-group">
										    <input id="amounts" name="amounts" type="number" class="form-control" disabled="disabled" />
										    <div class="input-group-addon">条</div>
									    </div>
								  	</div>
								  </div>
								  
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">导出格式</label>
								    <div class="col-sm-2">
								      	<select class="form-control" id="type" name="type">
										  <option value="excel">excel表格</option>
										</select>
								    </div>
								  </div>
								  
								  <div class="form-group">
								    <div class="col-sm-offset-2 col-sm-10">
								      <button id="export_button" type="button" class="btn btn-default"><i class="glyphicon glyphicon-save"></i> 导出</button>
								    </div>
								  </div>
								</form>
							</div>
						</div>
				    </div>
			    </div>
			</div>
			 
		</div>
		
	</div>
</div>

</@override>


<@override name="footer">
<script>
	window.daijia = {ctx:'${ctx}',totalElements:'${totalElements!0}'};
</script>
<script src="${ctx}/assets/js/datepicker.js"></script>
<script src="${ctx}/assets/js/jquery.paging.min.js"></script>
<script src="${ctx}/assets/js/chart/orderFromSource.js"></script>
</@override>
<@extends name="../layout.ftl"/>
